package com.zixuan.gulicollege.eduservice.controller;

import com.zixuan.gulicollege.common_utils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: EduLoginController
 * @Author: zixuan
 * @Date: 2021/4/30 22:22
 * @Description:
 */

@RestController
@RequestMapping("/edu_service/user")
public class EduLoginController {

    /**
     * 后台登录接口
     */
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token", "admin");
    }

    /**
     * 登录账户
     */
    @GetMapping("/info")
    public R info(){
        return R.ok()
                .data("roles", "[admin]")
                .data("name", "admin")
                .data("avatar", "https://cdn.jsdelivr.net/gh/CodeZixuan/Blog_Images/Generic/bg.png");
    }

}
